const Vue = require("../common/vue");
let _product_service = require('../../service/product-service');
require('../common/header/index')
require('../common/sidebar/index')
let records_vm = new Vue({
    el: "#records-table",
    data() {
        return {
            records: []
        }
    },
    methods: {
        getRecords: function(_this){
            _product_service.getRecords(function(res) {
                _this.records = res;
                console.log(_this.records);
                for(let i = 0;i < res.length;i++){
                    _this.records[i].src = _this.records[i].src.split("\"")[1];
                }
            }, function(err) {
                console.log(err);
            })
        }
    },
    created: function(){
        this.getRecords(this);
    }
});
